package com.woniuxy.service04;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author 佘赛飞
 * @create 2021 -11 -04 5:30 PM
 */
public class SomeServiceTest {

    @Test
    public void test01(){
        String path= "com/woniuxy/service04/applicationContext.xml";
        //相对路径 类路径 src根目录
        ApplicationContext ac=
                new ClassPathXmlApplicationContext(path);
        SomeService someService1 = (SomeService)ac.getBean("SomeService");
        SomeService someService2 = (SomeService)ac.getBean("SomeService");
//        someService1.doSome();
        System.out.println(someService1==someService2);
        System.out.println(someService1.equals(someService2));
    }


}
